home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.1 (Developer) [x86] / NeXT Step 3.1 Intel dev.cdr.dmg / NextDeveloper / Examples / IndexingKit / ToDoList / DailyBread.h < prev    next >
Encoding:
Text File  |  1993-02-16  |  1.2 KB  |  46 lines

  1. /*
  2. DailyBread.h - Copyright (c) 1992 NeXT Computer, Inc.
  3.  
  4. You may freely copy, distribute and reuse the code in this example.
  5. NeXT Computer, Inc. disclaims any warranty of any kind, expressed or implied, 
  6. as to its fitness for any particular use.
  7. */
  8.  
  9. #import <objc/Object.h>
  10. #define DBR_MAXFIELDS 32
  11.  
  12. @interface DailyBread:Object
  13. {
  14.     char        *_theDate;
  15.     char        *_number[DBR_MAXFIELDS];
  16.     float        textGrays[DBR_MAXFIELDS];
  17.     int        doneFields[DBR_MAXFIELDS];
  18.     int        upperLimit;
  19.     char        *_theStringValue;
  20.     BOOL    _changed;
  21. }
  22.  
  23. - initForDate:(const char *)theDate;
  24. - (char *)theDate;
  25.  
  26. - setNumber:(int)i to:(const char *)aString;
  27. - (char *)number:(int)i;
  28.  
  29. - setDone:(int)i to:(int)yn;
  30. - (int)done:(int)i;
  31.  
  32. - (float)textGrayOfNumber:(int)i;
  33. - setNumber:(int)i textGray:(float)gVal;
  34.  
  35. // composites all the text on this date into one string for searching purposes.
  36. - (const char *)stringValue;
  37.  
  38. // returns a string of length 50 with aWord more or less centered.
  39. - (const char *)midlingStringValueFor:(const char *)aWord;
  40.  
  41. // implement IXRecordTranscription protocol for faster serialization.
  42. - source:aSource didReadRecord:(unsigned)record;
  43. - source:aSource willWriteRecord:(unsigned)record; 
  44.  
  45. @end
  46.